package com.dk.controller;

import com.dk.data.Result;
import com.dk.em.ResultEnum;
import com.dk.entity.DtContentCategory;
import com.dk.service.DtContentCateGoryService;
import io.swagger.annotations.Api;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Api(value = "导航栏查询")
@RequestMapping("category")
public class DtCategroyController {
    @Resource
    private DtContentCateGoryService cateGoryService;

    @GetMapping
    @ApiIgnore(value = "导航栏查询")
    public Result categoryList(){
       List<DtContentCategory> categoryList =  cateGoryService.categoryList();
        return Result.response(ResultEnum.SUCCESS).setData(categoryList);
    }

}
